import request from '@/utils/request'

// 单行注释
/* 多行注释 */
/** 文档注释 */

/**
 * 这是获取表格数据的 API
 * @param {*} params 请求参数
 * @returns 一个 promise 对象
 */
export function getDepartments() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}
export function getDepartmentById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'get'
  })
}
export function updateDepartmentById(data) {
  return request({
    url: '/company/department/' + data.id,
    method: 'put',
    data
  })
}
export function delDepartmentById(id) {
  return request({
    url: '/company/department/' + id,
    method: 'DELETE'
  })
}
